
using Microsoft.VisualBasic;
using Admin2505.Application.Common.Interfaces;

namespace Admin2505.Iinfrastructure.Secunity;

public class PasswordHasher: IPasswordHasher
{    public string GenerateSalt()
    {
        return Guid.NewGuid().ToString("N");
    }


    public string HasPassword(string password ,string salt)
    {
        return BCrypt.Net.BCrypt.HashPassword(password+salt);

    }
    public bool VerifHashedPassword(string hashedPassword,string salt,string providedPassword)
    {
        return BCrypt.Net.BCrypt.Verify(providedPassword + salt ,hashedPassword);
    }

  
}